<?php
if(!defined('EC_K')) {
	exit('Access Denied.');
}

$message='';
$active=$_GET['active'];
if($active){
	$code=DeCode($active,'D','econtact');
	if(strstr($code,'_'))
	{
		$tempcode=explode('_',$code);
		$name=$tempcode[0];
		$vcode=$tempcode[1];
		if($name && $vcode)
			{
				 $sql = "select vcode from ec_reguser where username='$name'";
					$query = $db->query($sql);
					$row = $db->fetch_array($query);
					if ($row['vcode']=== $vcode)
				{$message="激活成功";}
					else
				{$message="失败";}
			}
	}
	else
	{$message="激活码有误";}
}
include($template->getfile('ec_verify.htm'));
?>